package com.ssy.lingxi.product.serviceImpl.saleorder;

import com.ssy.lingxi.product.service.saleorder.invoicestype.InvoicesTypeStrategy;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 单据业务处理工厂类
 * @author wrc
 * @date 2020/12/21
 */
@Service
public class InvoicesFactoryForStrategy {

    @Autowired
    private final Map<String, InvoicesTypeStrategy> invoicesTypeStrategys = new ConcurrentHashMap<>();


    /**
     * 获取单据类型处理业务基类
     *
     * @author wrc
     * @date 2020/12/2
     */
    public InvoicesTypeStrategy getInvoicesType(String code) {
        return invoicesTypeStrategys.get(code);
    }


}
